//
//  ICMRepairPartsModel.h
//  ICrEAM
//
//  Created by FoREVer_SaD on 16/10/28.
//  Copyright © 2016年 mac. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ICMProxyMaintenanceAndPartsView.h"
@class ICMMaintenanceAndPartsView;
@class ICMAppointmentMaintenanceAndPartsView;
@class ICMProxyMaintenanceAndPartsView;

typedef enum{
    RepairPartEditTypeDefualt = 0,
    RepairPartEditTypeAdd = 1,
    RepairPartEditTypeDelete = 2,
    RepairPartEditTypeUpdate = 3,
}RepairPartEditType;

@interface ICMRepairPartsArrayModel : NSObject<YYModel>
//接车
@property (nonatomic, strong) NSMutableArray *TT_RECPTION_PART;
//预约
@property (nonatomic, strong) NSMutableArray *TT_BOOKING_ORDER_PART;
//委托
@property (nonatomic, strong) NSMutableArray *TT_RO_REPAIR_PART;

- (void)setupRepairPartsArrayModelWithPartsView:(ICMMaintenanceAndPartsView*)partsView;
- (void)setupRepairPartsArrayModelWithWithArray:(NSArray *)array;

- (void)setupRepairPartsArrayModelWithAppointmentPartsView:(ICMAppointmentMaintenanceAndPartsView *)partsView;

- (void)setupRepairPartsArrayModelWithRoPartsView:(ICMProxyMaintenanceAndPartsView *)partsView;

- (void)createRepairPartsModel;
- (void)createRepairPartsBookingModel;
- (void)createRepairPartsRoModel;

@end

@interface ICMRepairPartsModel : NSObject<YYModel>

//查询需要的字段
@property (nonatomic, copy) NSString *PART_NO;//零件代码
@property (nonatomic, copy) NSString *PART_NAME;//零件名称
@property (nonatomic, strong) NSString *PART_SORT;//零件属性--获取
@property (nonatomic, strong) NSString *STOCK_QUANTITY;//账面库存
@property (nonatomic, strong) NSString *REAL_QUANTITY;//可用数量
@property (nonatomic, copy) NSString *SALES_PRICE;//销售单价
@property (nonatomic, copy) NSString *STORAGE_POSITION_CODE;//库位代码
@property (nonatomic, copy) NSString *OBLIGATED_QUANTITY;//数量
@property (nonatomic, copy) NSString *PART_QUANTITY;//零件数量  委托书活动里零件用

//提交还需要添加的字段
@property (nonatomic, copy) NSString *ITEM_ID;//零件ID
@property (nonatomic, copy) NSString *PART_SALES_PRICE;//销售单价--提交
@property (nonatomic, copy) NSString *PART_SALES_AMOUNT;//销售金额
@property (nonatomic, copy) NSString *PART_COST_PRICE;//成本单价
@property (nonatomic, copy) NSString *PART_COST_AMOUNT;//成本金额
@property (nonatomic, copy) NSString *REPAIR_TYPE_CODE;//维修类型
@property (nonatomic, strong) NSString *REPAIR_TYPE_NAME;//维修名称
@property (nonatomic, copy) NSString *OEM_TAG;//零件属性--提交
@property (nonatomic, copy) NSString *LEFT_QUANTITY;//留存
@property (nonatomic, copy) NSString *IS_OBLIGATED;//留存保存字段


@property (nonatomic, assign) float DISCOUNT;//折扣率
@property (nonatomic, copy) NSString *DISCOUNT_RATE;//折扣率
@property (nonatomic, strong) NSString *DISCOUNT_AMOUNT;//折后金额
@property (nonatomic, assign) BOOL isDiscount;
@property (nonatomic, strong) NSString *IS_DISCOUNT;//是否打折

//编辑类型
@property (nonatomic, assign) RepairPartEditType editType;


@property (nonatomic, strong) NSString *UPDATE_STATUS;//增删改标志
@property (nonatomic, strong) NSString *IS_FINISHED; //是否可以删除
@property (nonatomic, strong) NSString *ACTIVITY_NO;//活动code

@end
